
// testDlg.h : header file
//

#pragma once


#include "exec\executor.h"
#include "afxwin.h"


#include "audio_rec\system.h"
#include "audio_rec\audio_rec.h"

#include "audio_rec\wavefile.h"
#include "screen_rec\bmpfile.h"
#include "screen_rec\screencap.h"

#include "avi\avifile.h"
#include "exec\executor.h"
#include "video_rec\video_recorder.h"
#include "shape\rectangle.h"
#include "shape\shape_manager.h"

using namespace avlib;

class avlib::WaveFile;
class avlib::AudioRecorder;
class avlib::ScreenRecorder;
class avlib::AviFile;
class avlib::VideoRecorder;
class avlib::System;

// CtestDlg dialog
class CtestDlg : public CDialog,public console_callback_t
{
// Construction
public:
	CtestDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_TEST_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()



	void StartRecord();
	void StopRecord();
public :

	BOOL bRecording;
	BOOL bConverting;


	void TestIt();
	AudioRecorder *recorder;
	ScreenRecorder *screen;

	WaveFile *m_wav;
	AviFile *m_avi;
	VideoRecorder * video;
	afx_msg void OnBnClickedOk();

	virtual void parse(cparam_t param,const std::string  & str);
	CString m_progrss;
	afx_msg void OnBnClickedButton1();

	exec_id_t m_id;
	CComboBox mVideoSelector;
	CComboBox mAudioSelector;
	afx_msg void OnBnClickedRecord();
	afx_msg void OnBnClickedConvert();


	System *sys;

	int m_video_id;
	afx_msg void OnCbnSelchangeCombo1();
	afx_msg void OnCbnSelchangeCombo2();
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
};
